<?php

namespace app\user\repository;

class IndexRepository
{
    public function returnHuoyueCreate($create_at)
    {
        if ($create_at) {
            $create_at_arr = explode(' - ', $create_at);
            $start = $create_at_arr[0] . ' 00:00:00';
            $end = $create_at_arr[1] . ' 23:59:59';
        } else {
            $start = '2022-01-01 00:00:00';
            $end = '2022-12-31 23:59:59';
        }

        return [
            'start' => $start,
            'end' => $end,
        ];
    }
}
